package com.qf.sy2103.homework01;

import com.qf.sy2103.homework01.service.DataImportService;
import com.qf.sy2103.homework01.utils.FileUtils;

import java.io.IOException;
import java.util.List;

/**
 * 程序入口类
 * 单线程插入500万数据
 */
public class App {

    public static void main(String[] args) throws IOException {

//       generateData();

     //   DataImportService.importData("out.txt");
        DataImportService.CunFile("cun.txt");
    }


    public static void generateData() throws IOException {

        final List<String> list = FileUtils.loadDataFromFile("data.txt");

        for (int i=0;i<9;i++) {
            System.out.println(i);
            FileUtils.writeListToFile(list,"out.txt");
        }

    }

}
